Add more hints
authorMatthias Clasen <mclasen@redhat.com>
Thu, 10 Sep 2009 17:51:02 +0000 (13:51 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 10 Sep 2009 17:53:28 +0000 (13:53 -0400)
Mention problems related to cairo and clipping.

docs/reference/gtk/migrating-ClientSideWindows.sgml

index 5eecd19a61f308622f4e48967445eb5744fdb9e2..3860ee526f3e894d325fbbea65134321a705d4d3 100644 (file)
     may be affected by this.
   </para>
 
+  <para>
+    Problems can also occur when using cairo for drawing. One thing that can
+    go wrong is clip handling. If you ever need to reset the clip region on
+    a cairo_t (i.e. use cairo_reset_clip()), you have to to use
+    gdk_cairo_reset_clip() instead. The reason for this is that the cairo_reset_clip() call will remove the initial clip region that limits your drawing to
+    the client-side window at hand, so you will end up drawing over stuff
+    outside the window. You also need to use gdk_cairo_reset_clip() if you
+    use a cairo_t that was not allocated in a double-buffered expose handler
+    and keep it in use after window hierarchy changes (resizing, moving,
+    stacking order changes). The easiest fix for this kind of problem is to
+    simply create a new cairo context for each expose event.
+  </para>
+
 </chapter>